<?php

namespace AdminBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * HuobiSwitchLog
 *
 * @ORM\Table(name="huobi_switch_log")
 * @ORM\Entity
 */
class HuobiSwitchLog
{
    /**
     * @var string
     *
     * @ORM\Column(name="name", type="string", length=45, nullable=false)
     */
    private $name = '';

    /**
     * @var integer
     *
     * @ORM\Column(name="action", type="integer", nullable=false)
     */
    private $action = '0';

    /**
     * @var string
     *
     * @ORM\Column(name="controller", type="string", length=100, nullable=false)
     */
    private $controller = '';

    /**
     * @var string
     *
     * @ORM\Column(name="router", type="string", length=100, nullable=false)
     */
    private $router = '';

    /**
     * @var string
     *
     * @ORM\Column(name="http_agent", type="string", length=200, nullable=false)
     */
    private $httpAgent = '';

    /**
     * @var string
     *
     * @ORM\Column(name="client_ip", type="string", length=20, nullable=false)
     */
    private $clientIp = '';

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="ctime", type="datetime", nullable=false)
     */
    private $ctime = 'CURRENT_TIMESTAMP';

    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    private $id;


    public function __construct()
    {
        $this->ctime = new \DateTime();
    }

    /**
     * Set name
     *
     * @param string $name
     *
     * @return HuobiSwitchLog
     */
    public function setName($name)
    {
        $this->name = $name;

        return $this;
    }

    /**
     * Get name
     *
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Set action
     *
     * @param integer $action
     *
     * @return HuobiSwitchLog
     */
    public function setAction($action)
    {
        $this->action = $action;

        return $this;
    }

    /**
     * Get action
     *
     * @return integer
     */
    public function getAction()
    {
        return $this->action;
    }

    /**
     * Set controller
     *
     * @param string $controller
     *
     * @return HuobiSwitchLog
     */
    public function setController($controller)
    {
        $this->controller = $controller;

        return $this;
    }

    /**
     * Get controller
     *
     * @return string
     */
    public function getController()
    {
        return $this->controller;
    }

    /**
     * Set router
     *
     * @param string $router
     *
     * @return HuobiSwitchLog
     */
    public function setRouter($router)
    {
        $this->router = $router;

        return $this;
    }

    /**
     * Get router
     *
     * @return string
     */
    public function getRouter()
    {
        return $this->router;
    }

    /**
     * Set httpAgent
     *
     * @param string $httpAgent
     *
     * @return HuobiSwitchLog
     */
    public function setHttpAgent($httpAgent)
    {
        $this->httpAgent = $httpAgent;

        return $this;
    }

    /**
     * Get httpAgent
     *
     * @return string
     */
    public function getHttpAgent()
    {
        return $this->httpAgent;
    }

    /**
     * Set clientIp
     *
     * @param string $clientIp
     *
     * @return HuobiSwitchLog
     */
    public function setClientIp($clientIp)
    {
        $this->clientIp = $clientIp;

        return $this;
    }

    /**
     * Get clientIp
     *
     * @return string
     */
    public function getClientIp()
    {
        return $this->clientIp;
    }

    /**
     * Set ctime
     *
     * @param \DateTime $ctime
     *
     * @return HuobiSwitchLog
     */
    public function setCtime($ctime)
    {
        $this->ctime = $ctime;

        return $this;
    }

    /**
     * Get ctime
     *
     * @return \DateTime
     */
    public function getCtime()
    {
        return $this->ctime;
    }

    /**
     * Get id
     *
     * @return integer
     */
    public function getId()
    {
        return $this->id;
    }
}
